Skip to content

fix(init): skip interactive prompts when --resume is passed (closes #2098) - #2147

Closed
Larslllllll wants to merge 1 commit into
repowise-dev:mainfrom
Larslllllll:main
Closed

fix(init): skip interactive prompts when --resume is passed (closes #2098)#2147
Larslllllll wants to merge 1 commit into
repowise-dev:mainfrom
Larslllllll:main

Conversation

@Larslllllll

Copy link
Copy Markdown

Summary

When repowise init --resume is run on a TTY, the entire interactive questionnaire runs again (banner, mode menu, provider selection, etc.), defeating the purpose of --resume.

The git-tier is already handled correctly by effective_run_mode_for_resume() (computed before the interactive gate, so a fast resume never re-prompts for it). All other prompts were not similarly gated.

Root cause

is_interactive at line 1010 had no check for resume:

is_interactive = sys.stdin.isatty() and provider_name is None and not index_only and not yes

Fix

  1. Added and not resume to the is_interactive expression, so resume runs always fall through to the non-interactive path.
  2. Added a one-line console notice (e.g. [dim]Resuming a full run — reusing stored configuration.[/dim]) so the user can see the run was picked up rather than restarted.

The non-interactive path reads stored configuration from .repowise/config.yaml and state.json, so the prior run's provider, model, language, and other choices are reused automatically.

Fixes #2098

…powise-dev#2098)

When --resume is passed, the interactive gate was bypassed for the git-tier
check but all other prompts (mode menu, provider selection, etc.) ran again.
This changes the is_interactive expression to include `and not resume` so that
resume runs fall through to the non-interactive path that reads stored
configuration from .repowise/config.yaml and state.json.

Also prints a one-line notice naming the mode being resumed so the user
can confirm the run was picked up rather than restarted.
@RaghavChamadiya

Copy link
Copy Markdown
Member

Thanks @Larslllllll, and sorry for the collision: #2106 was opened against #2098 two days before this and is already through review, so that is the one I am going to land. Nothing wrong with your read of the bug, you landed on the same one-line gate.

Two differences worth knowing for next time, since neither is obvious from the issue. #2106 lifts the predicate out into a small _interactive_gate function with a case per flag, so the questionnaire cannot be re-opened by a later flag without a test going red; the inline and chain here has no such guard. And its notice avoids saying anything about how to suppress itself, which is the one thing I held that PR on: the print is unconditional under if resume:, so a line offering a way to silence it would be false in both versions.

If you want another one in the same area, #2137 is open and unassigned: editor_files: {vscode_mcp: false} is a key repowise writes and then never reads back, and the thread has the two gates that cause it. Say the word on that issue and it is yours.

I am leaving this open rather than closing it today: if #2106 goes quiet on the string change I asked for, yours is the fallback and I will merge it instead. Either way you will hear which on this thread.

@RaghavChamadiya

Copy link
Copy Markdown
Member

@Larslllllll, #2098 is fixed and closed, by #2106. As I said when you opened this, that one arrived on the issue first and carried tests, so it was the one I wanted to land; it went in a few minutes ago. Closing this as a duplicate rather than leaving it sitting red.

To be fair to your version, it is the same one-line diagnosis and you got there independently on the same day. The thing #2106 adds is that it lifts the predicate out of the inline and chain into a named _interactive_gate with a case per flag, so the next option added to that condition arrives with a test saying what it does to a resume. That is the only difference that decided it, not correctness.

If you want another, #2137 is open, labelled help wanted and unassigned: editor_files: {vscode_mcp: false} is a key repowise writes to config.yaml and then never reads, so init and update rewrite .vscode/mcp.json regardless. It is two gates rather than one and the thread already sets out where they are, including the trap that claude_md defaults True while agents_md defaults False, so a generic loop has to disable only on an explicit False. Say the word on that thread and it is yours.

@RaghavChamadiya

Copy link
Copy Markdown
Member

Correction to what I wrote above, @Larslllllll: I pointed you at #2137 without checking it properly, and it was already claimed. @z2Ace0107 asked for it on 5 September with a scoped plan and had simply been waiting on a reply from us; I have assigned it to them. That was my error, not a change of mind, and I am sorry for sending you at something that was not free.

Rather than hand you another one I have not checked, tell me roughly what you would like to work on, CLI, server, ingestion, or the web UI, and I will find you something genuinely unclaimed and confirm it is yours before you spend any time on it. You have now had two near-misses on this repo in one day and neither was your fault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] init --resume re-runs the whole interactive questionnaire

2 participants